import React, { Component, PropTypes } from 'react';
import { connect } from 'dva';
import UnityBox from '../../components/virtual/UnityBox';


function Virtual({ dispatch, virtual }) { 

    const unityProps = {
        config: virtual.config,
    }

    return (
        <div style={{width:'auto',height:document.body.clientHeight - 50,backgroundColor:'#fff'}} >
            <UnityBox {...unityProps} />
        </div>
    );
}

function mapStateToProps(state) {
  return { virtual : state.virtual,loading:state.loading.models.virtual};
}

export default connect(mapStateToProps)(Virtual);